﻿@model Project_KhuyenMaiVang.Models.SanPhamDTO

@{
    ViewBag.Title = "DangSanPham";
    Layout = "~/Views/Shared/_LayoutDoanhNghiep.cshtml";
    List<Project_KhuyenMaiVang.Models.LoaiSanPhamDTO> listloaisp = ViewBag.DsLoaiSanPham;
    var LoaiSpItems = new SelectList(listloaisp, "MaLoaiSanPham", "TenLoaiSanPham");
}
<script type="text/javascript" src="@Url.Content("~/Scripts/EditorScripts/innovaeditor.js")"></script>

@using (Html.BeginForm("DangSanPham","DoanhNghiep", FormMethod.Post, new { enctype = "multipart/form-data" })) {
    @Html.ValidationSummary(true)
        <form id="form3" name="form3" method="post" action="">
      <table width="600" border="0" cellspacing="0" cellpadding="0">
          <tr>
              <td colspan="2"><div align="center" class="TieuDeTheTable">ĐĂNG KÝ SẢN PHẨM</div></td>
          </tr>          
                  @Html.HiddenFor(model => model.MaSanPham)
          <tr>
              <td>Tên sản phẩm</td>
              <td>
                  @Html.EditorFor(model => model.TenSanPham)
                  @Html.ValidationMessageFor(model => model.TenSanPham) 
              </td>
          </tr>
              
          <tr>
              <td>Upload ảnh 1</td>
              <td>
                  <input type="file" name="filehinh1" id="filehinh1" />
              </td>
          </tr>
          <tr>
              <td>Upload ảnh 2</td>
              <td>
                  <input type="file" name="filehinh2" id="filehinh2" />
              </td>
          </tr>
                       <tr>
              <td>Upload ảnh 3</td>
              <td>
                  <input type="file" name="filehinh3" id="filehinh3" />
              </td>
          </tr>
                  <tr>
          <td>Mã loại sản phẩm</td>
            <td>
                  @Html.DropDownListFor(model => model.MaLoaiSanPham,LoaiSpItems)                  
            </td>
        </tr>
          <tr>
              <td>Giá gốc</td>
              <td>
                  @Html.EditorFor(model => model.GiaGoc)
                  @Html.ValidationMessageFor(model => model.GiaGoc)               
              </td>
          </tr>
        <tr>
            <td>Mô tả chi tiết</td>
            <td>
                @Html.TextAreaFor(model => model.MoTaChiTiet)
            </td>
            <script>                  //STEP 2: Replace the textarea (txtContent)
                  var oEdit1 = new InnovaEditor("oEdit1");
                  oEdit1.REPLACE("MoTaChiTiet"); //Specify the id of the textarea here
            </script>
        </tr>       
                 @Html.HiddenFor(model => model.IDAccount)                  
        <tr>
          <td>&nbsp;</td>
          <td><input type="submit" value="Create" /></td>
        </tr>
      </table>
    </form>
}
